<template>
  <van-config-provider :theme-vars="themeVars">
    <div class="login_container">

      <!-- 导航栏 -->
      <van-nav-bar class="login_top" title="网易严选">
        <template #left>
          <van-icon name="wap-home-o" size="32" color="#333" />
        </template>

        <template #right>
          <van-icon name="search" class="login_search" size="32" color="#333" />
          <van-icon name="shopping-cart-o" size="32" color="#333" />
        </template>
      </van-nav-bar>

      <!-- 根1 -->
      <div class="login_type">
        <!-- 下内容根组件 -->
        <div class="login_body">
          <!-- 图片 + 双登录 -->
          <div class="login_item">
            <!-- 中间logo图片 -->
            <div class="login_item_img">
              <van-image width="148" height="50" fit="contain" position="bottom"
                src="	https://yanxuan.nosdn.127.net/static-union/164793255107785e.png" />
            </div>
          </div>

          <!-- 输入验证 -->
          <div class="body_verify">
            <div class="phone_verify">
              <input type="text" placeholder="请输入邮箱" >
            </div>
            
            <div class="email_verify">
              <input type="text" placeholder="请输入密码">
            </div>
          </div>



          <!-- 注册账号和忘记密码 -->
          <div class="options">
            <span>注册账号</span>
            <span>忘记密码</span>
          </div>


          <!-- 按钮 -->
          <div class="loginButton">
            <van-button class="button_phone" type="danger" size="large" >登录</van-button>
          </div>

          <!-- 其他登录方式 -->
          <div class="otherOptions">
            <van-button type="default" size="small" to="Login">其他登录方式</van-button>
          </div>

        </div>
      </div>

    </div>
  </van-config-provider>
</template>


<script lang="ts">
export default {
  name: 'LoginWithEmial',
}
</script>

<script lang="ts" setup>
import { ref, reactive, createApp } from 'vue';
import { Image as VanImage, Col, Row, Button } from 'vant'
import { useRoute, useRouter } from 'vue-router';

const route = useRoute()
const router = useRouter()
const themeVars = reactive({
  // title字体
  navBarTitleFontSize: '24px',
  // button 边框颜色
  buttonDefaultBorderColor: '#FFFFFF'
});
</script>

<style scoped>
/* 导航 */
.login_top {
  background: #fafafa
}

/* 根1 */
.login_type {
  height: 688px;
  display: block;

}

/* 根2 */
.login_body {
  height: 100%;
  background: #fff;
  position: relative;
}

/* 搜索向右扩展 */
.login_search {
  margin-right: 14px;
}

/* 图片 */
.login_item_img {
  text-align: center;
  padding-top: 24px;
  margin-bottom: 40px;
}

/* 验证样式 */
.body_verify div input{
  border:none;
  border-bottom: 1px solid #d1cdcd98;
  font-size: 14px;
  width: 330px;
  height: 30px;
  margin-top: 20px;
}

.body_verify {
  margin: 0 auto;
  position:absolute;
  left: 50%;
  top: 28%;
  transform: translate(-50%,-50%);
}
.options{
  width: 330px;
  position: absolute;
  left: 50%;
  top:40% ;
  font-size: 14px;
  color: #524e4ec3;
  transform: translate(-50%,-50%);
}
.options :nth-child(2){
  margin-left: 217px;
}

.loginButton{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 330px;
}

.otherOptions{
  position: absolute;
  left: 50%;
  top: 65%;
  transform: translate(-50%,-50%);
  width: 100px;
  font-size: 14px;
}
</style>
